package com.yjkf.zh.admin.dao;

import com.yjkf.zh.admin.model.SysDevice;
import com.yjkf.zh.admin.model.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysDeviceMapper {
    //根据用户Id多参分页查询设备列表
  //  List<SysDevice> findPageDevPro(@Param(value="deviceName") String deviceName,@Param(value="id") java.lang.Long id);

    //根据用户Id带参分页查询设备列表
    List<SysDevice> findPageDevices(@Param(value="deviceName") String deviceName,@Param(value="id") java.lang.Long id);
    //根据用户ID
    List<SysDevice> findPageByDevices(@Param(value="id") java.lang.Long id);
    //根据用户ID查询设备属性列表
    List<SysDevice> findDevices(@Param(value="id") java.lang.Long id);
    //新增设备
    int insertDevice(SysDevice sysDevice);
    //修改设备
    int updateDevice(SysDevice sysDevice);
    //根据设备id查询设备信息
    SysDevice findDevice(@Param(value="id") Long id);


    List<SysDevice> findPageAdmin(@Param(value="deviceName")String deviceName);
    List<SysDevice> findPageByAdmin();

    List<SysDevice> findDeviceForIdent(@Param(value = "ident") String ident);

    List<SysDevice> findPageDeviceForAdmin(@Param(value="deviceName")String deviceName);
    List<SysDevice> findPageByDeviceForAdmin();

    int deleteDevice(Long id);

    //通过设备标识获取设备信息
    SysDevice findDeviceNameForIdent(@Param(value="ident") String ident);

    List<SysDevice> findDeviceForProductId(@Param(value="id") Long id);

    List<SysDevice> findByDeviceName(@Param(value="deviceName") String deviceName);

    SysDevice getDeviceForDeviceName(@Param(value="deviceName") String deviceName);
}
